import service from '@/utils/request';

export const getlistShareData = (pageIndex , pageSize) => {
    return service({
        url: '/UserApi/share/getDataShareList',
        method: 'get',
        params: {
            pageIndex,
            pageSize,
        },
    })
};

// 添加主权用户
export const addShareData = (data) => {
    return service({
      url: '/UserApi/share/addDataShare',
      method: 'post',
      data:{
        "buyerID":data.buyerID,
       /*  "sellerID":data.sellerID, */
        "infoFrom":data.infoFrom,
        "tradeID":data.tradeID,
        "tradePrice":data.tradePrice,
        "source":data.source,
        "dataIDs":data.dataIDs,
        "securityInId":data.securityInId,
        "tradeTime":data.tradeTime,
        "shareStatus":data.ShareStatus
      }
    })
  };

  export const updateShareDataStatus = (id,status) => {
    return service({
      url: '/UserApi/share/updateDataShareStatus',
      method: 'put',
      data:{
        "id":id,
        "shareStatus":status
      }
    })
  };
// 获取数据集列表
export const GetUserList=(pageIndex , pageSize)=> {
    return service({
        url: "/user/listNWYLUserById",
        method: "get",
        params: {
            pageIndex,
            pageSize,
        },
    })
}
// 获取数据集列表
export const GetDataList=(pageIndex , pageSize)=> {
    return service({
        url: "/data/getDataInfoByIdList",
        method: "get",
        params: {
            pageIndex,
            pageSize,
        },
    })
}
